package com.ruoyi.merchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.ProductTastesMapper;
import com.ruoyi.merchant.domain.ProductTastes;
import com.ruoyi.merchant.service.IProductTastesService;

/**
 * 菜品口味Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-22
 */
@Service
public class ProductTastesServiceImpl implements IProductTastesService 
{
    @Autowired
    private ProductTastesMapper productTastesMapper;

    /**
     * 查询菜品口味
     * 
     * @param tasteId 菜品口味主键
     * @return 菜品口味
     */
    @Override
    public ProductTastes selectProductTastesByTasteId(String tasteId)
    {
        return productTastesMapper.selectProductTastesByTasteId(tasteId);
    }

    /**
     * 查询菜品口味列表
     * 
     * @param productTastes 菜品口味
     * @return 菜品口味
     */
    @Override
    public List<ProductTastes> selectProductTastesList(ProductTastes productTastes)
    {
        return productTastesMapper.selectProductTastesList(productTastes);
    }

    /**
     * 新增菜品口味
     * 
     * @param productTastes 菜品口味
     * @return 结果
     */
    @Override
    public int insertProductTastes(ProductTastes productTastes)
    {
        return productTastesMapper.insertProductTastes(productTastes);
    }

    /**
     * 修改菜品口味
     * 
     * @param productTastes 菜品口味
     * @return 结果
     */
    @Override
    public int updateProductTastes(ProductTastes productTastes)
    {
        return productTastesMapper.updateProductTastes(productTastes);
    }

    /**
     * 批量删除菜品口味
     * 
     * @param tasteIds 需要删除的菜品口味主键
     * @return 结果
     */
    @Override
    public int deleteProductTastesByTasteIds(String[] tasteIds)
    {
        return productTastesMapper.deleteProductTastesByTasteIds(tasteIds);
    }

    /**
     * 删除菜品口味信息
     * 
     * @param tasteId 菜品口味主键
     * @return 结果
     */
    @Override
    public int deleteProductTastesByTasteId(String tasteId)
    {
        return productTastesMapper.deleteProductTastesByTasteId(tasteId);
    }
}
